package com.bsb.biz.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bsb.base.mapper.BsbKnowledgeImgMapper;
import com.bsb.base.model.BsbKnowledgeImg;
import com.bsb.base.model.BsbKnowledgeImgExample;

@Service
public class BsbKnowledgeImgService{
	
	@Resource
	private BsbKnowledgeImgMapper bsbKnowledgeImgMapper;
	
	public void addBsbKnowledgeImg(BsbKnowledgeImg bsbKnowledgeImg) {
		bsbKnowledgeImgMapper.insertSelective(bsbKnowledgeImg);
	}
	
	public void delBsbKnowledgeImgById(Integer id) {
		bsbKnowledgeImgMapper.deleteByPrimaryKey(id);
	}
	
	public void updateBsbKnowledgeImg(BsbKnowledgeImg bsbKnowledgeImg) {
		bsbKnowledgeImgMapper.updateByPrimaryKeySelective(bsbKnowledgeImg);
	}
	
	public void updateBsbKnowledgeImgByExample(BsbKnowledgeImg bsbKnowledgeImg,BsbKnowledgeImgExample bsbKnowledgeImgExample){
	    bsbKnowledgeImgMapper.updateByExampleSelective(bsbKnowledgeImg,bsbKnowledgeImgExample);
	}
	
	public BsbKnowledgeImg getBsbKnowledgeImgById(Integer id) {
		return bsbKnowledgeImgMapper.selectByPrimaryKey(id);
	}
	
	public List<BsbKnowledgeImg> getPageBsbKnowledgeImg(BsbKnowledgeImgExample bsbKnowledgeImgExample) {
		return bsbKnowledgeImgMapper.selectPage(bsbKnowledgeImgExample);
	}
	
	public int countBsbKnowledgeImg(BsbKnowledgeImgExample bsbKnowledgeImgExample) {
		return bsbKnowledgeImgMapper.countByExample(bsbKnowledgeImgExample);
	}
	
	public List<BsbKnowledgeImg> selectByExample(BsbKnowledgeImgExample example){
	    return bsbKnowledgeImgMapper.selectByExample(example);
	}
}
